<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link
    rel="stylesheet"
    href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
  />
    <style>
        .box{
            width: 100px;
            height: 100px;
            background-color: aquamarine;
            /* 设置动画变化为2s 线性变化 可以设置为all也可以设置width */
            transition: all 2s linear;
        }
        /* 当鼠标移到box上的效果 */
        .box:hover{
            width: 300px;
            height: 200px;
        }
        .box2{
            width: 100px;
            height: 100px;
            background-color: blue;
            margin: 100px;
            /* 自定义动画 animation */
            animation: spin 2s linear infinite;
        }
        @keyframes spin{
            0%{
                /* 默认rotate为Z轴 */
                transform: rotateY(0deg) translateX(0px) scale(1);
            }
            50%{
                transform: rotateY(180deg) translateX(100px) scale(2);
            }
            100%{
                transform: rotateY(360deg) translateX(0px) scale(1);
            }
        }
        .box3{
            width: 100px;
            height: 100px;
            background-color: aqua;
        }
    </style>
</head>
<body>
    <div class="box"></div>

    <div class="box2"></div>

    <div class="box3 animate__animated animate__bounce"></div>
    
</body>
</html>